package net.paruo.google.gwt.study_meeting.user_control.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;

public class ImagePopupPanel extends Composite {

	private static ImagePopupPanelUiBinder uiBinder = GWT
			.create(ImagePopupPanelUiBinder.class);

	interface ImagePopupPanelUiBinder extends UiBinder<Widget, ImagePopupPanel> {
	}

	@UiField
	PopupPanel panel;
	@UiField
	Image image;

	public ImagePopupPanel(String imageUrl) {
		initWidget(uiBinder.createAndBindUi(this));
		image.setUrl(imageUrl);
	}

	public void center() {
		panel.center();
	}

	public void hide() {
		panel.hide();
	}

}
